Calculate Rb spectrum and pulse velocity


In [1]:
from rubidium.D2 import *

In [2]:
%matplotlib inline

In [3]:
T = 273.15 + 20  # Temperature in Kelvin
Lc = 0.075  # Length of cell in meters
delta = linspace(-4, 6, 200)  # detuning in GHz
transdata = Transmission(delta*1e9, T, Lc)

ndata = Totaln(delta*1e9, T)

vg = groupVelocity(delta,T,Lc)
transit = Lc/vg
timeshift = transit - Lc/c

In [4]:
plot(delta, transdata)
title("Rubidium D2 Spectrum at T= " + str(T) + " K")
xlabel(r"Detuning $\Delta$ (GHz)")
ylabel("Transmission")


Out[4]:
<matplotlib.text.Text at 0x106ac6090>

In [5]:
plot(delta, ndata)
xlabel(r"Detuning $\Delta$ (GHz)")
ylabel("Index n")


Out[5]:
<matplotlib.text.Text at 0x106c094d0>

In [6]:
plot(delta[:-1], timeshift*1e9)
plot([delta[0], delta[-2]], [0, 0], color='#888888', linestyle='--', linewidth=1)
xlabel(r"Detuning $\Delta$ (GHz)")
ylabel(r"T (ns)")


Out[6]:
<matplotlib.text.Text at 0x106f58950>